home *** CD-ROM | disk | FTP | other *** search
/ Animation / Animation Vol.1 (Profi ROM)(1994).iso / pvquan15 / pac_base.dat < prev    next >
Text File  |  1991-11-28  |  8KB  |  303 lines

  1. // Persistence of Vision Raytracer
  2. // PAC_BASE.DAT
  3. // Based on PACMAN.DAT by Ville Saari
  4. // Copyright (c) 1991 Ferry Island Pixelboys
  5. {
  6. * PvRay scene description for 'Pac Man doing his favourite job'
  7. * Created: 03-Jan-91
  8. * Updated: 05-Jan-91
  9. *
  10. * You will need maze.iff which is included in this package.
  11. *
  12. * If you do some nice modifications or additions to this file, please send 
  13. * me a copy. My Internet address is:
  14. *
  15. *         vsaari@niksula.hut.fi
  16. }
  17.  
  18. #include "shapes.dat"
  19.  
  20. // Following #declares are used in animation
  21. // MAKEANIM alters them to different values
  22.  
  23. #declare lip_upper = -35.0
  24. #declare lip_lower = +10.0
  25.  
  26. #declare pac_z     = 0.0
  27. #declare f1_z      =  -25
  28. #declare f2_z      =  -45
  29. #declare f3_z      =  -65
  30. #declare f4_z      =  -85
  31. #declare f5_z      = -105
  32.  
  33. { For 3D views, the following was used to calculate the right eye position,
  34.   to give 5 degrees convergence at (40,10,0)
  35.  
  36. For left eye:
  37.   Distance to focal point      = sqrt((40+80)^2+(0+140)^2)
  38.                                = 184.39
  39.   Direction focal point to eye = atan((40+80)/(0+140))
  40.                                = -130.6 degrees
  41.  
  42. For right eye:
  43.   Direction focal point to eye = -130.6 + 5
  44.                                = -125.6 degrees
  45.   X coordinate                 = 40 + cos(-125.6) * 184.39
  46.                                = -67.34
  47.   Z coordinate                 = 0 + sin(-125.6) * 184.39
  48.                                = -149.93
  49. }
  50.  
  51. #declare eye_pos            = <-80.0 35.0 -140>
  52. // #declare eye_pos         = <-67.34 35.0 -149.93>   Uncomment for right eye
  53.  
  54. view_point
  55.    location eye_pos
  56.  
  57.    direction <0.0 0.0 1.0>
  58.    up  <0.0  1.0  0.0>
  59.    right <1.1922 0.0 0.0>
  60.  
  61.    sky <0.0 1.0 0.0>
  62.    look_at <40.0 10.0 0>
  63. end_view_point
  64.  
  65. object { The maze-textured ground }
  66.    plane <0.0 1.0 0.0> 0.0 end_plane
  67.    texture
  68.       imagemap <1.0 0.0 -1.0> iff "maze.iff" 
  69.        interpolate 2.0
  70.       end_map
  71.       scale <1600.0 1600.0 1600.0>
  72.       translate <-196.0 0.0 160.0>
  73.       ambient 0.3
  74.       diffuse 0.7
  75.       reflection 0.5
  76.    end_texture
  77. end_object
  78.  
  79. composite { And now the world famous... Ta Da! ... pac man }
  80.  
  81.    object { Body }
  82.       intersection
  83.          sphere <0.0 0.0 0.0>  30.0 end_sphere
  84.          sphere <0.0 0.0 0.0>  28.0 inverse end_sphere
  85.          union
  86.             plane <0.0 1.0 0.0> 0.0 rotate <lip_upper 0.0 0.0> end_plane
  87.             plane <0.0 -1.0 0.0> 0.0 rotate <lip_lower 0.0 0.0> end_plane
  88.          end_union
  89.          sphere <0.0 0.0 -29.0> 1.5
  90.             inverse
  91.             rotate <16.0 -4.0 0.0>
  92.          end_sphere
  93.          sphere <0.0 0.0 -29.0> 1.5
  94.             inverse
  95.             rotate <16.0 4.0 0.0>
  96.          end_sphere
  97.       end_intersection
  98.  
  99.       texture
  100.          colour red 0.9 green 0.8
  101.          ambient 0.3
  102.          diffuse 0.7
  103.          specular 0.5
  104.          roughness 0.1
  105.       end_texture
  106.    end_object
  107.    
  108.    object { Mouth }
  109.       intersection
  110.          sphere <0.0  0.0  0.0>  28.0 end_sphere
  111.          union
  112.             plane <0.0 2.0 0.0> -2.0 rotate <lip_upper 0.0 0.0> end_plane
  113.             plane <0.0 -2.0 0.0> -2.0 rotate <lip_lower 0.0 0.0> end_plane
  114.          end_union
  115.       end_intersection
  116.    
  117.       texture
  118.          ambient 0.25
  119.          diffuse 0.75
  120.          colour red 0.5
  121.       end_texture
  122.    end_object
  123.    
  124.    object { Tongue }
  125.       union
  126.          sphere <3.0 0.0 -15.0> 10.0 end_sphere
  127.          sphere <-3.0 0.0 -15.0> 10.0 end_sphere
  128.       end_union
  129.       rotate <-45.0 0.0 0.0>
  130.  
  131.       texture
  132.          colour red 1.0
  133.          wrinkles 0.5
  134.          scale <0.5 0.5 0.5>
  135.          ambient 0.3
  136.          diffuse 0.7
  137.          reflection 0.5
  138.       end_texture
  139.    end_object
  140.  
  141.    composite { Right eye }
  142.       object
  143.          sphere <0.0 0.0 0.0> 6.0 end_sphere
  144.          texture
  145.             colour red 1.0 green 1.0 blue 1.0
  146.             ambient 0.3
  147.             diffuse 0.7
  148.             reflection 0.5
  149.          end_texture
  150.       end_object
  151.       object
  152.          sphere <0.0 0.0 -2.3> 4.0 end_sphere
  153.          texture
  154.             colour red 0.3 green 0.4 blue 0.8
  155.             ambient 0.3
  156.             diffuse 0.7
  157.             reflection 0.5
  158.          end_texture
  159.       end_object
  160.       object
  161.          sphere <0.0 0.0 -5.5> 1.0 end_sphere
  162.          texture
  163.             colour red 0.0 green 0.0 blue 0.0 
  164.             ambient 0.3
  165.             diffuse 0.7
  166.             reflection 0.5
  167.          end_texture
  168.       end_object
  169.       object
  170.          quadric QSphere end_quadric
  171.          scale <9.0 2.0 9.0>
  172.          translate <0.0 8.0 6.0>
  173.          rotate <0.0 0.0 -10.0>
  174.          texture
  175.             colour red 0.0 green 0.0 blue 0.0 
  176.          end_texture
  177.       end_object
  178.    
  179.       rotate <-25.0 -20.0 0.0>
  180.       translate <0.0 0.0 -26.0>
  181.       rotate <25.0 20.0 0.0>
  182.    end_composite
  183.    
  184.    composite { Left eye }
  185.       object
  186.          sphere <0.0 0.0 0.0> 6.0 end_sphere
  187.          texture
  188.             colour red 1.0 green 1.0 blue 1.0
  189.             ambient 0.3
  190.             diffuse 0.7
  191.             reflection 0.5
  192.          end_texture
  193.       end_object
  194.       object
  195.          sphere <0.0 0.0 -2.3> 4.0 end_sphere
  196.          texture
  197.             colour red 0.3 green 0.4 blue 0.8
  198.             ambient 0.3
  199.             diffuse 0.7
  200.             reflection 0.5
  201.          end_texture
  202.       end_object
  203.       object
  204.          sphere <0.0 0.0 -5.5> 1.0 end_sphere
  205.          texture
  206.             colour red 0.0 green 0.0 blue 0.0 
  207.             ambient 0.3
  208.             diffuse 0.7
  209.             reflection 0.5
  210.          end_texture
  211.       end_object
  212.       object
  213.          quadric QSphere end_quadric
  214.          scale <9.0 2.0 9.0>
  215.          translate <-0.0 8.0 6.0>
  216.          rotate <0.0 0.0 10.0>
  217.          texture
  218.             colour red 0.0 green 0.0 blue 0.0 
  219.          end_texture
  220.       end_object
  221.  
  222.       rotate <-25.0 20.0 0.0>
  223.       translate <0.0 0.0 -26.0>
  224.       rotate <25.0 -20.0 0.0>
  225.    end_composite
  226.  
  227.    bounded_by
  228.       sphere <0.0 0.0 -2.0> 32.0 end_sphere
  229.    end_bound
  230.  
  231.    translate <0.0 32.0 pac_z>
  232. end_composite
  233.  
  234. object { Food... }
  235.    sphere <0.0 27.0 f1_z> 4.0 end_sphere
  236.  
  237.    texture
  238.       colour red 1.0 green 1.0 blue 1.0
  239.       ambient 0.3
  240.       diffuse 0.7
  241.       specular 2.0
  242.       roughness 0.01
  243.       reflection 0.6
  244.    end_texture
  245. end_object
  246.  
  247. object { ... more food ... }
  248.    sphere <0.0 27.0 f2_z> 4.0 end_sphere
  249.  
  250.    texture
  251.       colour red 1.0 green 1.0 blue 1.0
  252.       ambient 0.3
  253.       diffuse 0.7
  254.       reflection 0.5
  255.    end_texture
  256. end_object
  257.  
  258. object { ... and even more ... }
  259.    sphere <0.0 27.0 f3_z> 4.0 end_sphere
  260.  
  261.    texture
  262.       colour red 1.0 green 1.0 blue 1.0
  263.       ambient 0.3
  264.       diffuse 0.7
  265.       reflection 0.5
  266.    end_texture
  267. end_object
  268.  
  269. object { ... uh ... yet more food ... }
  270.    sphere <0.0 27.0 f4_z> 4.0 end_sphere
  271.  
  272.    texture
  273.       colour red 1.0 green 1.0 blue 1.0
  274.       ambient 0.3
  275.       diffuse 0.7
  276.       reflection 0.5
  277.    end_texture
  278. end_object
  279.  
  280. object { ... Yuck! ... no more please! }
  281.    sphere <0.0 27.0 f5_z> 4.0 end_sphere
  282.  
  283.    texture
  284.       colour red 1.0 green 1.0 blue 1.0
  285.       ambient 0.3
  286.       diffuse 0.7
  287.       reflection 0.5
  288.    end_texture
  289. end_object
  290.  
  291. object { Click }
  292.    sphere <0.0  0.0  0.0> 2.0 end_sphere
  293.    translate <60.0  120.0  -170.0>
  294.    texture
  295.       colour red 1.0 green 1.0 blue 1.0
  296.       ambient 1.0
  297.       diffuse 0.0
  298.    end_texture
  299.    colour red 1.0 green 1.0 blue 1.0
  300.    light_source
  301. end_object
  302.